home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / STRINGS / PACKAGE6 / READCHAR.DOC < prev    next >
Text File  |  1990-07-25  |  1KB  |  38 lines

  1. -----------------------------------------------------------------------------
  2. ReadLnCharacter
  3. -----------------------------------------------------------------------------
  4.  
  5. declaration:       procedure ReadLnCharacter (var Character:
  6.                                                     char;
  7.                                               var LastKey:
  8.                                                     TypeKey);
  9.  
  10. purpose:           Reads in one character allowing only 'A'..'Z', 'a'..'z'
  11.                    Enter, Escape, and Backspace.
  12.  
  13. pre-condition:     Character is undefined, LastKey is undefined
  14.  
  15. post-condition:    Character is set to blank if Escape is pressed, and
  16.                    keeps value if Enter is pressed
  17.  
  18. special cases:     none
  19.  
  20. example:           var Character:
  21.                          char
  22.                    var LastKey:
  23.                          TypeKey;
  24.  
  25.                    begin
  26.                      .
  27.                      .
  28.                      .
  29.                      ReadLnCharacter (Character, LastKey);
  30.                      if LastKey <> EscapeKey then
  31.                        write (output, Character);
  32.                      .
  33.                      .
  34.                      .
  35.                    end;
  36.  
  37. -----------------------------------------------------------------------------
  38.